var checkAttachment = (rule, value, callback) => {
  if (!value || value && value.length === 0) {
    callback(new Error('请上传合同附件'));
  } else {
    callback();
  }
};

// var checkPhone = (rule, value, callback) => {
//   if (!value || value && value.length === 0) {
//     callback(new Error('请输入对方公司联系人电话'));
//   } else {
//     const phoneReg = /^(13[0-9]|14[5-9]|15[0-3,5-9]|16[2,5-7]|17[0-8]|18[0-9]|19[0-3,5-9])\d{8}$/; // 手机
//     const landlineReg = /^[0][1-9]{2,3}-[0-9]{5,10}$/; // 座机
//     if (phoneReg.test(value) || landlineReg.test(value)) {
//       callback();
//     } else {
//       return callback(new Error('请输入正确的联系人电话'));
//     }
//   }
// };

export const typeOneRules = {
  'createInfo.proposer': [
    { required: true, message: '请选择申请人', trigger: 'change' }
  ],
  'createInfo.departmentId': [
    { required: true, message: '请选择部门', trigger: 'change' }
  ],
  'createInfo.post': [
    { required: true, message: '请输入职位', trigger: 'blur' }
  ],
  'createInfo.type': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.name': [
    { required: true, message: '请输入项目名称', trigger: 'blur' }
  ],
  'contractInfo.tempSource': [
    { required: true, message: '请选择合同模板来源', trigger: 'change' }
  ],
  'contractInfo.subject': [
    { required: true, message: '请选择我方签约主体', trigger: 'change' }
  ],
  'contractInfo.oppCompany': [
    { required: true, message: '请输入签约对方', trigger: 'blur' }
  ],
  'contractInfo.upstreamSign': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.upstreamPay': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.payAdvance': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.propertyOwner': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.rebates': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.date.type': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.date.legalDate': [
    { required: true, message: '请选择合同起止日期', trigger: 'change' }
  ],
  'contractInfo.date.stagesYearType': [
    { required: true, message: '请选择年框类类型', trigger: 'change' }
  ],
  'contractInfo.date.settleAccountPeriod': [
    { required: true, message: '请选择合结算周期', trigger: 'change' }
  ],
  'contractInfo.date.items.payDate': [
    { required: true, message: '请选择填写分期日期', trigger: 'change' }
  ],
  // 'contractInfo.contractCodes': [
  //   { required: false, message: '', trigger: 'change' }
  // ],
  // 'contractInfo.contractCodes.code': [
  //   { required: false, message: '请输入关联合同编号', trigger: 'change' }
  // ],
  'contractInfo.describe': [
    { required: true, message: '请输入合同说明及合作内容', trigger: 'blur' }
  ],
  'contractInfo.legalTemplate': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.ourStamp': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.attachment': [
    { required: true, message: '请上传合同附件', trigger: 'change' },
    { validator: checkAttachment, trigger: 'change' }
  ]
};

export const typeTwoRules = {
  'createInfo.proposer': [
    { required: true, message: '请选择申请人', trigger: 'change' }
  ],
  'createInfo.departmentId': [
    { required: true, message: '请选择部门', trigger: 'change' }
  ],
  'createInfo.post': [
    { required: true, message: '请输入职位', trigger: 'blur' }
  ],
  'createInfo.type': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.name': [
    { required: true, message: '请输入项目名称', trigger: 'blur' }
  ],
  'contractInfo.tempSource': [
    { required: true, message: '请选择合同模板来源', trigger: 'change' }
  ],
  'contractInfo.subject': [
    { required: true, message: '请选择我方签约主体', trigger: 'change' }
  ],
  'contractInfo.oppCompany': [
    { required: true, message: '请输入签约对方', trigger: 'blur' }
  ],
  'contractInfo.upstreamSign': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.upstreamPay': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.payAdvance': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.propertyOwner': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.rebates': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.date.type': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.date.pushTime': [
    { required: true, message: '请选择执行发布时间', trigger: 'change' }
  ],
  'contractInfo.date.payWay': [
    { required: true, message: '请选择付款方式', trigger: 'change' }
  ],
  'contractInfo.date.items.payDate': [
    { required: true, message: '请选择填写分期日期', trigger: 'change' }
  ],
  // 'contractInfo.contractCodes': [
  //   { required: false, message: '', trigger: 'change' }
  // ],
  // 'contractInfo.contractCodes.code': [
  //   { required: false, message: '请输入关联合同编号', trigger: 'change' }
  // ],
  'contractInfo.describe': [
    { required: true, message: '请输入合同说明及合作内容', trigger: 'blur' }
  ],
  'contractInfo.legalTemplate': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.ourStamp': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.attachment': [
    { required: true, message: '请上传合同附件', trigger: 'change' },
    { validator: checkAttachment, trigger: 'change' }
  ],
  'contractInfo.receivableAmount': [
    { required: true, message: '请输入应收合同金额', trigger: 'blur' }
  ],
  'contractInfo.payableAmount': [
    { required: true, message: '请输入应付合同金额', trigger: 'blur' }
  ]
};

export const ipAccreditLegalRules = {
  'createInfo.proposer': [
    { required: true, message: '请选择申请人', trigger: 'change' }
  ],
  'createInfo.departmentId': [
    { required: true, message: '请选择部门', trigger: 'change' }
  ],
  'createInfo.post': [
    { required: true, message: '请输入职位', trigger: 'blur' }
  ],
  'createInfo.type': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.name': [
    { required: true, message: '请输入项目名称', trigger: 'blur' }
  ],
  'contractInfo.tempSource': [
    { required: true, message: '请选择合同模板来源', trigger: 'change' }
  ],
  'contractInfo.subject': [
    { required: true, message: '请选择我方签约主体', trigger: 'change' }
  ],
  'contractInfo.oppCompany': [
    { required: true, message: '请输入签约对方', trigger: 'blur' }
  ],
  'contractInfo.date.type': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.date.pushTime': [
    { required: true, message: '请选择执行发布时间', trigger: 'change' }
  ],
  'contractInfo.date.payWay': [
    { required: true, message: '请选择付款方式', trigger: 'change' }
  ],
  'contractInfo.date.items.payDate': [
    { required: true, message: '请选择填写分期日期', trigger: 'change' }
  ],
  // 'contractInfo.contractCodes': [
  //   { required: false, message: '', trigger: 'change' }
  // ],
  // 'contractInfo.contractCodes.code': [
  //   { required: false, message: '请输入关联合同编号', trigger: 'change' }
  // ],
  'contractInfo.describe': [
    { required: true, message: '请输入合同说明及合作内容', trigger: 'blur' }
  ],
  'contractInfo.legalTemplate': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.ourStamp': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.attachment': [
    { required: true, message: '请上传合同附件', trigger: 'change' }
    // { validator: checkAttachment, trigger: 'change' }
  ],
  'authorBillInfo.content': [
    { required: true, message: '请输入IP形象/授权内容', trigger: 'blur' }
  ],
  'authorBillInfo.territory': [
    { required: true, message: '请输入授权领域', trigger: 'blur' }
  ],
  'authorBillInfo.modality': [
    { required: true, message: '请输入授权商品品类/授权形式', trigger: 'blur' }
  ],
  'authorBillInfo.nature': [
    { required: true, message: '请选择授权性质', trigger: 'change' }
  ],
  'authorBillInfo.region': [
    { required: true, message: '请选择授权区域', trigger: 'change' }
  ],
  'authorBillInfo.deadline': [
    { required: true, message: '', trigger: 'change' }
  ],
  'authorBillInfo.deadline.date': [
    { required: true, message: '请选择授权期限', trigger: 'change' }
  ],
  'authorBillInfo.deadline.period': [
    { required: true, message: '请输入期数', trigger: 'blur' }
  ],
  'authorBillInfo.costMode': [
    { required: true, message: '请选择授权分成模式', trigger: 'change' }
  ],
  'authorBillInfo.totalMoney': [
    { required: true, message: '请输入授权总金额', trigger: 'blur' }
  ],
  'authorBillInfo.payDeadline': [
    { required: true, message: '', trigger: 'change' }
  ],
  'authorBillInfo.payDeadline.type': [
    { required: true, message: '', trigger: 'change' }
  ],
  'authorBillInfo.payDeadline.payWay': [
    { required: true, message: '请选择支付方式', trigger: 'change' }
  ],
  'authorBillInfo.payDeadline.payPeriod': [
    { required: true, message: '请选择结算周期', trigger: 'change' }
  ],
  'authorBillInfo.payDeadline.period': [
    { required: true, message: '请输入期数', trigger: 'blur' }
  ],
  'authorBillInfo.payDeadline.payDates.date': [
    { required: true, message: '请输入期数', trigger: 'change' }
  ]
};

export const staffAdministrationLegalRules = {
  'createInfo.proposer': [
    { required: true, message: '请选择申请人', trigger: 'change' }
  ],
  'createInfo.departmentId': [
    { required: true, message: '请选择部门', trigger: 'change' }
  ],
  'createInfo.post': [
    { required: true, message: '请输入职位', trigger: 'blur' }
  ],
  'createInfo.type': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.name': [
    { required: true, message: '请输入项目名称', trigger: 'blur' }
  ],
  'contractInfo.tempSource': [
    { required: true, message: '请选择合同模板来源', trigger: 'change' }
  ],
  'contractInfo.subject': [
    { required: true, message: '请选择我方签约主体', trigger: 'change' }
  ],
  'contractInfo.signType': [
    { required: true, message: '请选择签约类型', trigger: 'change' }
  ],
  'contractInfo.oppCompany': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.oppIdentity': [
    { required: true, message: '请输入对方身份证号码', trigger: 'change' }
  ],
  'contractInfo.cooperDate.type': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.cooperDate.payWay': [
    { required: true, message: '请选择付款方式', trigger: 'change' }
  ],
  'contractInfo.cooperDate.deadlineType': [
    { required: true, message: '请选择期限类型', trigger: 'change' }
  ],
  'contractInfo.cooperDate.accountPeriod': [
    { required: true, message: '请选择合结算周期', trigger: 'change' }
  ],
  'contractInfo.cooperDate.period': [
    { required: true, message: '请输入结束期数', trigger: 'change' }
  ],
  'contractInfo.cooperDate.items.payDate': [
    { required: true, message: '请选择付款时间', trigger: 'change' }
  ],
  'contractInfo.cooperDate.items.timeType': [
    { required: true, message: '请选择付款时间', trigger: 'change' }
  ],
  // 'contractInfo.contractCodes': [
  //   { required: false, message: '', trigger: 'change' }
  // ],
  // 'contractInfo.contractCodes.code': [
  //   { required: false, message: '请输入关联合同编号', trigger: 'change' }
  // ],
  'contractInfo.describe': [
    { required: true, message: '请输入合同说明及合作内容', trigger: 'blur' }
  ],
  'contractInfo.legalTemplate': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.ourStamp': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.attachment': [
    { required: true, message: '请上传合同附件', trigger: 'change' }
  ]
};

export const kolLegalRules = {
  'createInfo.proposer': [
    { required: true, message: '请选择申请人', trigger: 'change' }
  ],
  'createInfo.departmentId': [
    { required: true, message: '请选择部门', trigger: 'change' }
  ],
  'createInfo.post': [
    { required: true, message: '请输入职位', trigger: 'blur' }
  ],
  'createInfo.type': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.name': [
    { required: true, message: '请输入项目名称', trigger: 'blur' }
  ],
  'contractInfo.tempSource': [
    { required: true, message: '请选择合同模板来源', trigger: 'change' }
  ],
  'contractInfo.subject': [
    { required: true, message: '请选择我方签约主体', trigger: 'change' }
  ],
  'contractInfo.oppCompany': [
    { required: true, message: '请输入签约对方信息', trigger: 'blur' }
  ],
  'contractInfo.deadline': [
    { required: true, message: '请选择合同期限', trigger: 'change' }
  ],
  'contractInfo.accountPeriod': [
    { required: true, message: '请选择合同期限', trigger: 'change' }
  ],
  'contractInfo.accountPeriod.type': [
    { required: true, message: '请选择结算周期类型', trigger: 'change' }
  ],
  'contractInfo.accountPeriod.name': [
    { required: true, message: '请输入周期', trigger: 'blur' }
  ],
  // 'contractInfo.contractCodes': [
  //   { required: false, message: '', trigger: 'change' }
  // ],
  // 'contractInfo.contractCodes.code': [
  //   { required: false, message: '请输入关联合同编号', trigger: 'change' }
  // ],
  'contractInfo.autoRenewal': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.gmvRate': [
    { required: true, message: '请输入GMV分成比例', trigger: 'blur' }
  ],
  'contractInfo.describe': [
    { required: true, message: '请输入合同说明及合作内容', trigger: 'blur' }
  ],
  'contractInfo.legalTemplate': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.ourStamp': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.attachment': [
    { required: true, message: '请上传合同附件', trigger: 'change' }
  ],
  'contractInfo.signType': [
    { required: true, message: '请选择签约类型', trigger: 'change' }
  ],
  'contractInfo.oppIdentity': [
    { required: true, message: '请输入对方身份证号码', trigger: 'change' }
  ],
  'contractInfo.rebates': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.cooperPlatforms': [
    { required: true, message: '请添加合作平台', trigger: 'change' }
  ],
  'contractInfo.cooperPlatforms.type': [
    { required: true, message: '请选择平台', trigger: 'change' }
  ],
  'contractInfo.cooperPlatforms.name': [
    { required: true, message: '请输入平台名称', trigger: 'blur' }
  ],
  'contractInfo.cooperPlatforms.account': [
    { required: true, message: '请输入合作账号信息', trigger: 'blur' }
  ],
  'contractInfo.contractType': [
    { required: true, message: '请选择合同类别', trigger: 'change' }
  ],
  'contractInfo.cooperationMode': [
    { required: true, message: '请选择合作方式', trigger: 'change' }
  ],
  'contractInfo.profitSharingRatio': [
    { required: true, message: '请输入公司分成比例', trigger: 'blur' }
  ]
  // 'contractInfo.cooperModel': [
  //   { required: true, message: '', trigger: 'change' }
  // ],
  // 'contractInfo.cooperModel.type': [
  //   { required: true, message: '请选择合作模式', trigger: 'change' }
  // ],
  // 'contractInfo.cooperModel.name': [
  //   { required: true, message: '请输入合作模式', trigger: 'blur' }
  // ],
  // 'contractInfo.cooperNature': [
  //   { required: true, message: '请选择合作性质', trigger: 'change' }
  // ],
  // 'contractInfo.earnings': [
  //   { required: true, message: '', trigger: 'change' }
  // ],
  // 'contractInfo.earnings.proportion': [
  //   { required: true, message: '请输入分成比例', trigger: 'blur' }
  // ],
  // 'contractInfo.earnings.guaranteeSum': [
  //   { required: true, message: '请输入保底金额', trigger: 'blur' }
  // ]
};

export const platformLegalRules = {
  'createInfo.proposer': [
    { required: true, message: '请选择申请人', trigger: 'change' }
  ],
  'createInfo.departmentId': [
    { required: true, message: '请选择部门', trigger: 'change' }
  ],
  'createInfo.post': [
    { required: true, message: '请输入职位', trigger: 'blur' }
  ],
  'createInfo.type': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.name': [
    { required: true, message: '请输入项目名称', trigger: 'blur' }
  ],
  'contractInfo.tempSource': [
    { required: true, message: '请选择合同模板来源', trigger: 'change' }
  ],
  'contractInfo.subject': [
    { required: true, message: '请选择我方签约主体', trigger: 'change' }
  ],
  'contractInfo.oppCompany': [
    { required: true, message: '请输入签约对方信息', trigger: 'blur' }
  ],
  'contractInfo.deadline': [
    { required: true, message: '请选择合同期限', trigger: 'change' }
  ],
  'contractInfo.accountPeriod': [
    { required: true, message: '请选择合同期限', trigger: 'change' }
  ],
  'contractInfo.accountPeriod.type': [
    { required: true, message: '请选择结算周期类型', trigger: 'change' }
  ],
  'contractInfo.accountPeriod.name': [
    { required: true, message: '请输入周期', trigger: 'blur' }
  ],
  // 'contractInfo.contractCodes': [
  //   { required: false, message: '', trigger: 'change' }
  // ],
  // 'contractInfo.contractCodes.code': [
  //   { required: false, message: '请输入关联合同编号', trigger: 'change' }
  // ],
  'contractInfo.describe': [
    { required: true, message: '请输入合同说明及合作内容', trigger: 'blur' }
  ],
  'contractInfo.legalTemplate': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.ourStamp': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.attachment': [
    { required: true, message: '请上传合同附件', trigger: 'change' }
  ],
  'contractInfo.cooperPlatforms': [
    { required: true, message: '请添加合作平台', trigger: 'change' }
  ],
  'contractInfo.cooperPlatforms.type': [
    { required: true, message: '请选择平台', trigger: 'change' }
  ],
  'contractInfo.cooperPlatforms.name': [
    { required: true, message: '请输入平台名称', trigger: 'blur' }
  ],
  'contractInfo.cooperPlatforms.account': [
    { required: true, message: '请输入合作账号信息', trigger: 'blur' }
  ],
  'contractInfo.cooperModel': [
    { required: true, message: '请输入合作模式', trigger: 'blur' }
  ],
  'contractInfo.cooperModelName': [
    { required: true, message: '请输入合作模式', trigger: 'blur' }
  ],
  'contractInfo.cooperNature': [
    { required: true, message: '请选择合作性质', trigger: 'change' }
  ],
  'contractInfo.earningModel': [
    { required: true, message: '请输入收益模式', trigger: 'blur' }
  ],
  'contractInfo.cooperRegion': [
    { required: true, message: '请输入合作地域', trigger: 'blur' }
  ]
};

export const eCommerceLegalRules = {
  'createInfo.proposer': [
    { required: true, message: '请选择申请人', trigger: 'change' }
  ],
  'createInfo.departmentId': [
    { required: true, message: '请选择部门', trigger: 'change' }
  ],
  'createInfo.post': [
    { required: true, message: '请输入职位', trigger: 'blur' }
  ],
  'createInfo.type': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.name': [
    { required: true, message: '请输入项目名称', trigger: 'blur' }
  ],
  'contractInfo.tempSource': [
    { required: true, message: '请选择合同模板来源', trigger: 'change' }
  ],
  'contractInfo.subject': [
    { required: true, message: '请选择我方签约主体', trigger: 'change' }
  ],
  'contractInfo.oppCompany': [
    { required: true, message: '请输入签约对方信息', trigger: 'blur' }
  ],
  'contractInfo.depositBank': [
    { required: true, message: '请输入对方开户行', trigger: 'blur' }
  ],
  'contractInfo.accountName': [
    { required: true, message: '请输入对方公司户名', trigger: 'blur' }
  ],
  'contractInfo.accountNumber': [
    { required: true, message: '请输入对方公司银行账号', trigger: 'blur' }
  ],
  'contractInfo.contactPerson': [
    { required: true, message: '请输入对方公司联系人', trigger: 'blur' }
  ],
  'contractInfo.contactPhone': [
    { required: true, message: '请输入对方公司联系人电话', trigger: 'blur' }
    // { validator: checkPhone, trigger: 'blur' }
  ],
  'contractInfo.supplierAddress': [
    { required: true, message: '请输入供应商详细地址', trigger: 'blur' }
  ],
  'contractInfo.deadline': [
    { required: true, message: '请选择合同期限', trigger: 'change' }
  ],
  'contractInfo.accountPeriod': [
    { required: true, message: '请选择合同期限', trigger: 'change' }
  ],
  'contractInfo.cooperModel': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.cooperModel.type': [
    { required: true, message: '请选择合作模式', trigger: 'change' }
  ],
  'contractInfo.accountPeriod.type': [
    { required: true, message: '请选择结算周期类型', trigger: 'change' }
  ],
  'contractInfo.accountPeriod.name': [
    { required: true, message: '请输入周期', trigger: 'blur' }
  ],
  // 'contractInfo.contractCodes': [
  //   { required: false, message: '', trigger: 'change' }
  // ],
  // 'contractInfo.contractCodes.code': [
  //   { required: false, message: '请输入关联合同编号', trigger: 'change' }
  // ],
  'contractInfo.describe': [
    { required: true, message: '请输入合同说明及合作内容', trigger: 'blur' }
  ],
  'contractInfo.legalTemplate': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.ourStamp': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.businessLicense': [
    { required: true, message: '请上传营业执照', trigger: 'change' }
  ],
  'contractInfo.attachment': [
    { required: true, message: '请上传合同附件', trigger: 'change' }
  ],
  'merchandiseInfos.contractCode': [
    { required: false, message: '请输入关联合同编号', trigger: 'blur' }
  ],
  'merchandiseInfos.productName': [
    { required: false, message: '请输入产品名称', trigger: 'blur' }
  ],
  'merchandiseInfos.productSpecification': [
    { required: false, message: '请输入产品规格', trigger: 'blur' }
  ],
  'merchandiseInfos.productSpecificationCode': [
    { required: true, message: '请输入产品规格编号', trigger: 'blur' }
  ],
  'merchandiseInfos.unitPrice': [
    { required: false, message: '请输入分销/批采单价', trigger: 'blur' }
  ],
  'merchandiseInfos.retailPriceRange': [
    { required: false, message: '请输入零售价区间', trigger: 'blur' }
  ],
  'merchandiseInfos.commissionRatio': [
    { required: false, message: '请输入佣金比例', trigger: 'change' }
  ],
  'merchandiseInfos.isFreeShipping': [
    { required: false }
  ],
  'merchandiseInfos.postageDesc': [
    { required: false, message: '请输入邮费说明', trigger: 'change' }
  ],
  'merchandiseInfos.purchaseUnit': [
    { required: true, message: '请输入采购单价', trigger: 'change' }
  ],
  'merchandiseInfos.purchaseNum': [
    { required: true, message: '请输入采购数量', trigger: 'change' }
  ],
  'merchandiseInfos.purchaseNumUnit': [
    { required: true, message: '请输入采购数量单位', trigger: 'change' }
  ],
  'merchandiseInfos.businessLicense': [
    { required: false, message: '', trigger: 'change' }
  ],
  'merchandiseInfos.productFile': [
    { required: false, message: '', trigger: 'change' }
  ],
  'merchandiseInfos.powerOfAttorney': [
    { required: false, message: '', trigger: 'change' }
  ],
  'merchandiseInfos.trademarkFile': [
    { required: false, message: '', trigger: 'change' }
  ]
};

export const investLegalRules = {
  'createInfo.proposer': [
    { required: true, message: '请选择申请人', trigger: 'change' }
  ],
  'createInfo.departmentId': [
    { required: true, message: '请选择部门', trigger: 'change' }
  ],
  'createInfo.post': [
    { required: true, message: '请输入职位', trigger: 'blur' }
  ],
  'createInfo.type': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.name': [
    { required: true, message: '请输入项目名称', trigger: 'blur' }
  ],
  'contractInfo.tempSource': [
    { required: true, message: '请选择合同模板来源', trigger: 'change' }
  ],
  'contractInfo.subject': [
    { required: true, message: '请选择我方签约主体', trigger: 'change' }
  ],
  'contractInfo.oppCompany': [
    { required: true, message: '请输入签约对方信息', trigger: 'blur' }
  ],
  'contractInfo.contractDate': [
    { required: true, message: '请选择签约日期', trigger: 'change' }
  ],
  'contractInfo.accountPeriod': [
    { required: true, message: '请选择合同期限', trigger: 'change' }
  ],
  'contractInfo.businessType': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.businessType.type': [
    { required: true, message: '请选择业务类型', trigger: 'change' }
  ],
  'contractInfo.businessType.name': [
    { required: true, message: '请输入业务类型', trigger: 'blur' }
  ],
  'contractInfo.appraisementAmount': [
    { required: true, message: '请输入本轮估值', trigger: 'blur' }
  ],
  'contractInfo.involveAmountStock': [
    { required: true, message: '请输入股权比例', trigger: 'blur' }
  ],
  'contractInfo.involveAmount': [
    { required: true, message: '请输入涉及金额', trigger: 'blur' }
  ],
  'contractInfo.payDates': [
    { required: true, message: '请添加付款日期', trigger: 'change' }
  ],
  'contractInfo.payDates.payDate': [
    { required: true, message: '请选择日期', trigger: 'change' }
  ],
  'contractInfo.aaumChangeDate': [
    { required: true, message: '请选择工商变更登记时间', trigger: 'change' }
  ],
  // 'contractInfo.contractCodes': [
  //   { required: false, message: '', trigger: 'change' }
  // ],
  // 'contractInfo.contractCodes.code': [
  //   { required: false, message: '请输入关联合同编号', trigger: 'change' }
  // ],
  'contractInfo.describe': [
    { required: true, message: '请输入合同说明及合作内容', trigger: 'blur' }
  ],
  'contractInfo.legalTemplate': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.ourStamp': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.attachment': [
    { required: true, message: '请上传合同附件', trigger: 'change' }
  ],
  'merchandiseInfos.contractCode': [
    { required: true, message: '请输入关联合同编号', trigger: 'blur' }
  ]
};

export const otherLegalRules = {
  'createInfo.proposer': [
    { required: true, message: '请选择申请人', trigger: 'change' }
  ],
  'createInfo.departmentId': [
    { required: true, message: '请选择部门', trigger: 'change' }
  ],
  'createInfo.post': [
    { required: true, message: '请输入职位', trigger: 'blur' }
  ],
  'createInfo.type': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.name': [
    { required: true, message: '请输入项目名称', trigger: 'blur' }
  ],
  'contractInfo.tempSource': [
    { required: true, message: '请选择合同模板来源', trigger: 'change' }
  ],
  'contractInfo.subject': [
    { required: true, message: '请选择我方签约主体', trigger: 'change' }
  ],
  'contractInfo.oppCompany': [
    { required: true, message: '请输入签约对方信息', trigger: 'blur' }
  ],
  'contractInfo.writType': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.writType.type': [
    { required: true, message: '请选择合同/文书', trigger: 'change' }
  ],
  'contractInfo.writType.name': [
    { required: true, message: '请输入合同/文书类型', trigger: 'blur' }
  ],
  'contractInfo.moneyInvolved': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.moneyInvolved.isMoneyInvolved': [
    { required: true, message: '', trigger: 'change' }
  ],
  'contractInfo.moneyInvolved.ratioCommission': [
    { required: true, message: '请输入分成比例', trigger: 'blur' }
  ],
  'contractInfo.moneyInvolved.amount': [
    { required: true, message: '请输入金额', trigger: 'blur' }
  ],
  'contractInfo.moneyInvolved.payDates.payDate': [
    { required: true, message: '请选择日期', trigger: 'change' }
  ],
  // 'contractInfo.contractCodes': [
  //   { required: false, message: '', trigger: 'change' }
  // ],
  // 'contractInfo.contractCodes.code': [
  //   { required: false, message: '请输入关联合同编号', trigger: 'change' }
  // ],
  'contractInfo.describe': [
    { required: true, message: '请输入合同说明及合作内容', trigger: 'blur' }
  ],
  'contractInfo.legalTemplate': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.ourStamp': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.attachment': [
    { required: true, message: '请上传合同附件', trigger: 'change' }
  ],
  'merchandiseInfos.contractCode': [
    { required: true, message: '请输入关联合同编号', trigger: 'blur' }
  ],
  'contractInfo.otherDec': [
    { required: false, message: '请输入特殊约定', trigger: 'blur' }
  ]
};

export const historyLegalRules = {
  'contractInfo.code': [
    { required: true, message: '请输入合同编号', trigger: 'blur' }
  ],
  'contractInfo.date': [
    { required: false, message: '请选择合同日期', trigger: 'blur' }
  ],
  'contractInfo.oppCompany': [
    { required: false, message: '请输入签约对方信息', trigger: 'blur' }
  ],
  'contractInfo.projectName': [
    { required: false, message: '请输入项目名称', trigger: 'blur' }
  ],
  'contractInfo.amount': [
    { required: false, message: '请输入合同金额', trigger: 'blur' }
  ],
  'contractInfo.isYearFrame': [
    { required: false, message: '请选择是否年框', trigger: 'change' }
  ],
  'contractInfo.executeDate': [
    { required: false, message: '请选择执行日期', trigger: 'change' }
  ],
  'contractInfo.signDate': [
    { required: false, message: '请选择合同签约时间', trigger: 'change' }
  ],
  'contractInfo.stampArchivesDate': [
    { required: false, message: '请选择已盖章存档日期', trigger: 'change' }
  ],
  'contractInfo.businessType': [
    { required: false, message: '请输入业务类型', trigger: 'blur' }
  ],
  'contractInfo.post': [
    { required: false, message: '请输入部门', trigger: 'blur' }
  ],
  'contractInfo.particularJob': [
    { required: false, message: '经手人', trigger: 'blur' }
  ],
  'contractInfo.otherDec': [
    { required: false, message: '备注', trigger: 'blur' }
  ],
  'contractInfo.legalTemplate': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.ourStamp': [
    { required: true, message: '请选择', trigger: 'change' }
  ],
  'contractInfo.attachment': [
    { required: false, message: '请上传合同附件', trigger: 'change' }
  ]
};
